#!/bin/bash

pod install


rm -rf archive
if [ ! -d "archive" ];then
mkdir archive
fi

xcodebuild -workspace /Users/Shared/Jenkins/Home/workspace/ios/xxxxxxxx/xxxxxxxx.xcworkspace -scheme xxxxxxxx -configuration "Release" clean

pwd
#xcodebuild archive -workspace /Users/Shared/Jenkins/Home/workspace/ios/xxxxxxxx/xxxxxxxx.xcworkspace -scheme xxxxxxxx -configuration Release -archivePath /Users/Shared/Jenkins/Home/workspace/ios/xxxxxxxx/archive  -allowProvisioningUpdates -allowProvisioningDeviceRegistration
#xcodebuild archive -workspace xxxxxxxx.xcworkspace -scheme xxxxxxxx -configuration Release -archivePath archive  -allowProvisioningUpdates -allowProvisioningDeviceRegistration


#jenkins
xcodebuild archive -workspace xxxxxxxx.xcworkspace -scheme xxxxxxxx -configuration Release -archivePath archive/xxxxxxxx.xcarchive  -allowProvisioningUpdates -allowProvisioningDeviceRegistration
#xcodebuild -exportArchive -archivePath  /Users/Shared/Jenkins/Home/workspace/ios，/xxxxxxxx/archive/xxxxxxxx.xcarchive -exportPath ipa -exportOptionsPlist  /Users/Shared/Jenkins/Home/workspace/ios/xxxxxxxx/ExportOptions.plist

#ls

#本地*****************************************************************************************

#xcodebuild archive -workspace xxxxxxxx.xcworkspace -scheme xxxxxxxx -configuration Release -archivePath "archive/xxxxxxxx.xcarchive"  -allowProvisioningUpdates -allowProvisioningDeviceRegistration

#xcodebuild -exportArchive -archivePath  /Users/zjyn/Desktop/haha/xxxxxxxx/archive/xxxxxxxx.xcarchive -exportPath ipa -exportOptionsPlist  /Users/zjyn/Desktop/ExportOptions.plist

